@model OpenPac.Models.Candidate

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.FirstName)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.FirstName)
    @Html.ValidationMessageFor(model => model.FirstName)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.LastName)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.LastName)
    @Html.ValidationMessageFor(model => model.LastName)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Email)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Email)
    @Html.ValidationMessageFor(model => model.Email)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Seat)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Seat)
    @Html.ValidationMessageFor(model => model.Seat)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.WebSiteUrl)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.WebSiteUrl)
    @Html.ValidationMessageFor(model => model.WebSiteUrl)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Party)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Party)
    @Html.ValidationMessageFor(model => model.Party)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.IsIncumbent)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.IsIncumbent)
    @Html.ValidationMessageFor(model => model.IsIncumbent)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Birthday)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Birthday)
    @Html.ValidationMessageFor(model => model.Birthday)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.TwitterId)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.TwitterId)
    @Html.ValidationMessageFor(model => model.TwitterId)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.YouTubeId)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.YouTubeId)
    @Html.ValidationMessageFor(model => model.YouTubeId)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.FacebookId)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.FacebookId)
    @Html.ValidationMessageFor(model => model.FacebookId)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.LinkedInId)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.LinkedInId)
    @Html.ValidationMessageFor(model => model.LinkedInId)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.SelfDescription)
</div>
<div class="editor-field">
    @Html.TextAreaFor(model => model.SelfDescription)
    @Html.ValidationMessageFor(model => model.SelfDescription)
</div>

<div class="editor-label">
    District
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.DistrictId, ((IEnumerable<OpenPac.Models.District>)ViewBag.PossibleDistricts).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.Id.ToString(),
        Selected = (Model != null) && (option.Id == Model.DistrictId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.DistrictId)
</div>
<script src="/Scripts/ckeditor/ckeditor.js" type="text/javascript"></script>
<script src="/Scripts/ckeditor/adapters/jquery.js" type="text/javascript"></script>

<script type="text/javascript">
    jQuery(function ($) {
        $('#SelfDescription').ckeditor();
    });
</script>